<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
  </style>
</head>

<body>
  <script>
    var tables = document.createElement('table')
    var tds = document.createElement('td')
    var trs = document.createEvent('tr')
    var attr = document.createAttribute('align')
    attr.value = 'center'
    tables.setAttribute(attr)
    tables.push(tds)
    tds.push(trs)
    console.log(tables)
    document.write("<table align='center'>")
    for (var i = 1; i <= 9; i++) {
      document.write('<tr>')
      for (var j = 1; j <= 9; j++) {
        document.write('<td>')
        document.write(i + '*' + j + '=' + (i * j) + '&nbsp&nbsp')
        document.write('<td>')
      }
      document.write('</tr>')
    }
    document.write('</table>')
  </script>
</body>

</html>